//
//  CyCleCollectionViewcCell.m
//  16-封装collectionView轮播图
//
//  Created by 冀永金 on 16/8/4.
//  Copyright © 2016年 冀永金. All rights reserved.
//

#import "CyCleCollectionViewcCell.h"

@implementation CyCleCollectionViewcCell
- (instancetype)initWithFrame:(CGRect)frame {
    self = [super initWithFrame:frame];
    if (self) {
        self.cycleImage = [[UIImageView alloc]init];
        [self.contentView addSubview:_cycleImage];
       self.label = [[UILabel alloc]init];
       [self.contentView addSubview:_label];
        
        //self.cycleImage.backgroundColor = [UIColor redColor];
    }
    return self;
}
- (void)layoutSubviews {
    [super layoutSubviews];
    self.cycleImage.frame = self.bounds;
    _label.frame = CGRectMake(0, 0, self.frame.size.width / 2, 30);
   _label.backgroundColor = [UIColor yellowColor];
    if (self.delegate !=nil && [self.delegate respondsToSelector:@selector(cycleWith:)]) {
        [self.delegate cycleWith:self];
    }

    }
@end
